#include "avz.h"

using namespace AvZ;

void Script()
{
    SetZombies({
        ZOMBIE,
        POLE_VAULTING_ZOMBIE,
        FOOTBALL_ZOMBIE,
        DANCING_ZOMBIE,
        ZOMBONI,
        JACK_IN_THE_BOX_ZOMBIE,
        DIGGER_ZOMBIE,
        POGO_ZOMBIE,
        BUNGEE_ZOMBIE,
        LADDER_ZOMBIE,
        CATAPULT_ZOMBIE,
        GARGANTUAR,
        GIGA_GARGANTUAR,
        DOLPHIN_RIDER_ZOMBIE,
        SNORKEL_ZOMBIE,
    });

    SelectCards({
        ICE_SHROOM,
        M_ICE_SHROOM,
        COFFEE_BEAN,
        PUFF_SHROOM,
        SUN_SHROOM,
        SCAREDY_SHROOM,
        FLOWER_POT,
        WALL_NUT,
        SQUASH,
    });

    SetTime(-599, 1);
    pao_operator.resetPaoList({
        {3, 1},
        {4, 1},
        {3, 3},
        {4, 3},
        {1, 5},
        {2, 5},
        {3, 5},
        {4, 5},
        {5, 5},
        {6, 5},
        {1, 7},
        {2, 7},
        {3, 7},
        {4, 7},
        {5, 7},
        {6, 7},
    });

    ice_filler.start({{1, 1}, {2, 1}, {5, 1}, {6, 1}});

    for (auto wave : {1, 3, 5, 7, 12, 14, 16, 18}) {
        SetTime(-95, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(0);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(602 - 100 - 198);
        ice_filler.coffee();
    }

    for (auto wave : {2, 4, 6, 8, 11, 13, 15, 17}) {
        SetTime(-95, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(950 - 373);
        pao_operator.pao({{2, 9}, {5, 9}});
    }

    for (auto wave : {10}) {
        SetTime(-95 + 27, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(0);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(602 - 100 - 198);
        ice_filler.coffee();
    }

    for (auto wave : {9}) {
        SetTime(-95, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(0);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(602 - 100 - 198);
        ice_filler.coffee();
    }

    for (auto wave : {19}) {
        SetTime(-95, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(950 - 373);
        pao_operator.pao({{2, 9}, {5, 9}});
    }

    for (auto wave : {20}) {
        SetTime(-150, wave);
        pao_operator.pao(4, 7.5875);
        SetTime(-55);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(410 - 373);
        pao_operator.recoverPao({{2, 9}, {5, 9}, {2, 9}, {5, 9}, {2, 9}, {5, 9}});
    }
}